﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using TA.DotNetUtils;

namespace TA.Turbo.Controls
{
	/// <summary>
	/// The next page button.
	/// </summary>
	public class RepeaterPageButtonNext : BaseRepeaterPageButton
	{
		internal RepeaterPageButtonNext(Repeater repeater)
			: base(repeater)
		{

		}
		/// <summary>
		/// Gets PagerSettings.Next.
		/// </summary>
		public override PagerElement PagerElement
		{
			get { return this.PagerSettings.Next; }
		}
		/// <summary>
		/// Gets the index to the right from the Repeater's current page index.
		/// </summary>
		public override int Index
		{
			get { return Math.Min(this.Repeater.NumPages - 1, this.Repeater.ActualPageIndex + 1); }
		}
		/// <summary>
		/// Gets "next".
		/// </summary>
		public override string CssClass
		{
			get { return "next"; }
		}
	}
}